﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<button data-event="test">open dialog</button>

<script>
    $('button[data-event=test]').on('click', function () {
        var d = dialog({
            title: '消息',
            content: '风吹起的青色衣衫，夕阳里的温暖容颜，你比以前更加美丽，像盛开的花<br>——许巍《难忘的一天》',
            okValue: '确 定',
            ok: function () {
                var that = this;
                setTimeout(function () {
                    that.title('提交中..');
                }, 2000);
                return false;
            },
            cancelValue: '取消',
            cancel: function () {
                alert('你点了取消按钮');
            }
        });

        d.showModal();
    });
</script>

